import request from '@/utils/request'

// 查询课程列表
export function listLesson(query) {
  return request({
    url: '/stu/lesson/list',
    method: 'get',
    params: query
  })
}
export function listLessonAll(query) {
    return request({
        url: '/stu/lesson/listAll',
        method: 'get',
        params: query
    })
}


// 查询课程详细
export function getLesson(id) {
  return request({
    url: '/stu/lesson/' + id,
    method: 'get'
  })
}

// 新增课程
export function addLesson(data) {
  return request({
    url: '/stu/lesson',
    method: 'post',
    data: data
  })
}

// 修改课程
export function updateLesson(data) {
  return request({
    url: '/stu/lesson',
    method: 'put',
    data: data
  })
}

// 删除课程
export function delLesson(id) {
  return request({
    url: '/stu/lesson/' + id,
    method: 'delete'
  })
}
